Fchmod

Section: Oct. 7, 1991 (2)
Updated: MiNT Programmer's Manual
Index Return to Main Contents
 

NAME

Fchmod - set file access permissions  

SYNOPSIS

#include <filesys.h>

LONG Fchmod( char *name, WORD mode );
 

DESCRIPTION

Fchmod changes the file access permissions for the file named name. The new access permissions are given in the word mode, which may be constructed by or'ing together the following symbolic constants (defined in filesys.h):
S_IRUSR,
Read, write, and execute permission (respectively) for the owner of the file.
S_IRGRP,
Read, write, and execute permission (respectively) for the file's group.
S_IROTH,
Read, write, and execute permission for everybody else.

Note that not all file systems support all of these bits; bits not supported by a file system will be ignored.

Note also that "execute" permission for a directory means permission to search the directory for a file name or name component.  

RETURNS

0 on success

EACCDN if the calling process has an effective uid which differs from the owner of the file and which is not 0.

EFILNF if the file is not found

EPTHNF if the path to the file is not found.  

SEE ALSO

Fattrib(2), Fxattr(2)


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURNS
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 11:14:01 GMT, June 22, 2025